<?php include THEMES_PATH . 'public/before_body2.phtml';?>
<link href="/statics/front/css/custom.min.css?<?php echo C('update_vesion'); ?>" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/statics/test/css/show.css">
<link href="/statics/front/css/header.css?v=20160111" rel="stylesheet">

</head>
<body>
	<?php include THEMES_PATH . 'public/header2.phtml';?>
	
    <div class="container">
        <div class="slider_l">
            <div class="left">
            	<?php foreach($photoList as $key=>$val){ ?>
                <a href="javascript:void(0);">
                    <img src="<?php echo $val['thumb'];?>" >
                </a>
                <?php } ?>
            </div>
            <input type="hidden" id="page" value="1" />
            <input type="hidden" id="web_url" value="<?php echo $web_url;?>" />
            <input type="hidden" id="fileName" value="<?php echo $productFileName;?>" />

    		<div class="right" id="threesixty" image_count='8'
            <?php $j=0;
			foreach($is_show_attributeList as $key=>$val){
             	if(!in_array($key,array(253,259,269)) && $val['is_ll']==0){
			?>
            	 path_pattern<?php echo $j;?>="<?php echo $web_url.$url."/".$fabrics."/".$val['desc_name']."/".$val['values'][0]['desc_name'].'/'.$fabrics."_".$val['values'][0]['desc_name']."_c#index#.png"?>";
            <?php
				$j++;
				}
			}
			?>

            end_frame='6' scale='1' fix_width='700' fix_height='700' max_width='700' max_height='700' attributeCount="<?php echo count($attr_arr)-1;?>">
      		<!-- 这里跟右边顺序对应 不能随便改变顺序 -->
                <em class="loading"><p>0%</p></em>
                <ol></ol>
    		</div>
  		</div>
  		<div class="slider_r">
    		<ul>
    			<?php foreach($is_show_attributeList as $key=>$val){ if($val['is_ll']==0){ ?>
                <li class="<?php if($key==255){ echo ' shirt_cuffs'; }  if($key==256){ echo ' shirt_cut'; } if($key==280){ echo ' breast_pocket'; } if($key==279){ echo ' vest_lapel'; } ?>">
                	<a class="sel_title <?php if($key==253 || $key==259 || $key==269 || $key==281){ echo 'active'; }?>" href="javascript:"><i></i>选择<?php echo $val['name'];?></a>
                    <div class="<?php if($key==253 || $key==259 || $key==269 || $key==281){ echo 'sel_fabric'; }else{ echo 'sel_info'; } ?>">
                    	<?php $a=0;foreach($val['values'] as $k=>$v){ ?>
                        <a href="javascript:" data-src="<?php echo $v['desc_name'];?>" class="<?php if($k==0){ echo ' on'; }  if($key==258 && $v['attr_value_id']==1507){ echo ' shirt_long_sleeve'; } if($key==258 && $v['attr_value_id']==1508){ echo ' shirt_short_sleeve'; } if($key==276 && $v['attr_value_id']==1560){ echo ' v_vest_lapel'; } if($key==276 && $v['attr_value_id']==1569){ echo ' u_vest_lapel'; } if($key==278){ echo ' vest_lining'; }?>">
                        	<img src="<?php if($key==253 || $key==259 || $key==269 || $key==281){ echo str_replace(".png","_thumb.png",$v['image']);}else{ echo $v['image']; }?>" title="<?php echo $v['desc_name'];?>" cartgory="<?php echo $val['desc_name'];?>" desc="<?php echo $key.':'.$val['name'].':'.$v['product_attr_id'] .':'. $v['label'].':'. $v['attr_value_id'];?>" attr_id="<?php echo $key;?>">
                        </a>
                        <?php }?>
                    </div>
                </li>
                <?php }} ?>

     		</ul>
			<a href="javascript:" class="new_btn go_next" style="margin-top:20px; float:right">下一步</a>
  		</div>
        <input type="hidden" value="<?php echo $productInfo['id'];?>" id="pid" />
        <input type="hidden" value="<?php echo $sel_custom_val;?>" id="sel_custom_val" />
		<input type="hidden" id="msizedata" value="<?php echo $msizedata; ?>"/>
	</div>
	<div>
<div class="clearfix w1366 center-block custom-container">
		<?php
		if (isset($no_show_attributeList) && $no_show_attributeList):
		?>
		<div class="js-attr-content" style="background:#fff;" id="more_wrap"
			 data-goods-id="<?php echo $productInfo['id']; ?>">
			<div class="inner">
				<div
					class="panel<?php if (!$quickbuy): ?> show<?php endif; ?> js-first-panel <?php echo "show_" . $fabrics_name; ?>">
					<?php
					$order_i = 0;
					foreach ($no_show_attributeList as $attr_id => $attr):
							//判断是否为绣字属性
						if ($attr_id != 9999 && $attr['is_monogram'] != 1 && $attr['is_ll'] != 2):
							?>
							<?php if ($attr['attr_pro_type'] == 0): $order_i++; ?>
							<div class="attribute" attr_val="<?php echo $attr_id; ?>">
								<div class="attr-head">
									<i class="js-serial-num"><?php echo $order_i; ?></i>
									<strong><?php echo $attr['name']; ?></strong>
									<strong class="add_money"><?php if(intval($attr['values'][0]['add_money'])>0){ ?>(+<?php echo currency($attr['values'][0]['add_money'])?>) <?php } ?></strong>
									<span data-attr-id="<?php echo $attr_id; ?>"
										  class="js-btn-help"><?php echo L('help'); ?></span>
								</div>
								<?php $mobile_active_img = ''; ?>
								<ul class="attr-list" id="attr_value_ul">
									<?php
									$j = 0;
									if (isset($attr['values']) && $attr['values']):
										foreach ($attr['values'] as $attrv):
											if ($attr_id == 29) {
												if ($attr['default'] == $attrv['product_attr_id']) {
													$libu_attr = $attrv['attr_value_id'];
													$libu_attr_img = $attrv['libu_img'];
												}
											}
											if ($attr['default'] == $attrv['product_attr_id']) {
												if (isset($mutex_arr[$attr_id])) {
													if (isset($mutex_arr[$attr_id][$attrv['attr_value_id']])) {
														foreach($mutex_arr[$attr_id][$attrv['attr_value_id']] as $mutex_arr_k=>$mutex_arr_v){
															$mutex_hide_arr[$mutex_arr_k] = $mutex_arr_v;
														}
													}
												}
											}
											//面料挂面对应over
											$j++;
											if ($attrv['label'])://删除的属性值不显示
												?>
												<li attr_value_val="<?php echo $attrv['attr_value_id']; ?>"
													id="hidden_miaoliao_<?php echo $attrv['attr_value_id']; ?>" <?php if ($attrv['libu_img']): ?> data-img="<?php echo $attrv['libu_img']; ?>"<?php endif; ?>
													title="<?php echo $attr_id . ':' . $attr['name'] . ':' . $attrv['product_attr_id'] . ':' . $attrv['label'] . ':' . $attrv['attr_value_id']; ?>"
													class="<?php if ($attrv['is_down'] == 1) {
														if ($attr['default'] == $attrv['product_attr_id']) {
															echo 'selected';
														}

													} ?>" is_down_value="<?php echo $attrv['is_down']; ?>" add_money="<?php if(intval($attrv['add_money'])>0){ echo currency($attrv['add_money']); }else{ echo '0'; } ?>" style="<?php if(isset($mutex_hide_arr[$attr_id])){
													if(in_array($attrv['attr_value_id'],$mutex_hide_arr[$attr_id])){
														echo "display: none;";
													}}?>
													">
													<a href="javascript:">
														<?php if ($attr['default'] == $attrv['product_attr_id']) $mobile_active_img = $attrv['image2']; ?>
														<img src="<?php echo $web_url."/data/timthumb.php?rand=" .time()."&v=1&w=96&h=116&zc=2&src=" . $attrv['image']; ?>"/>
														<img src="<?php echo $web_url."/data/timthumb.php?rand=" .time()."&v=1&w=96&h=116&zc=2&src=" . $attrv['image2']; ?>" class="active"/>
														<?php if ($productInfo['3d_show'] && $attrv['issd']): ?><i
															class="tag-3d js-tag-3d">3D</i><?php endif; ?>
													</a>

													<p class="attr-val"><?php echo $attrv['label']; ?><?php echo $attrv['add_money'] > 0 ? "<br>(+" . currency($attrv['add_money']) . ")" : ""; ?></p>

												</li>

											<?php endif; ?>
											<?php
										endforeach;
									endif;
									?>
								</ul>
								<div class="mobile-attr js-mobile-attr">
									<?php if ($mobile_active_img): ?><img
										src="<?php echo $web_url."/data/timthumb.php?rand=" .time()."&v=1&w=96&h=116&zc=2&src=" . $mobile_active_img; ?>"><?php endif; ?>
									<?php if ($productInfo['3d_show'] && $attrv['issd']): ?><i
										class="tag-3d js-tag-3d">3D</i><?php endif; ?>
								</div>
							</div>
						<?php endif;
						endif;
					endforeach;
					?>
					<?php if (!empty($monogram_attributeList)): ?>
						<div class="attribute" attr_val="<?php echo $monogram_attributeList['monogram'][0]['attr_id']; ?>">
							<div class="attr-head">
								<i class="js-serial-num"><?php $order_i = $order_i+1; echo $order_i; ?></i>
								<strong>Front Pocket</strong>
								<span data-attr-id="<?php echo $monogram_attributeList['monogram'][0]['attr_id']; ?>" class="js-btn-help">Help</span>
							</div>
							<div class="clearfix">
								<div class="embroidered">
									<div class="info">
										<?php foreach ($monogram_attributeList['monogram'] as $key=>$attr): ?>
											<label>
												<em><?php echo L('line'.($key+1)); ?>:</em>
												<input type="text" maxlength="10"
													   value=""
													   title="<?php echo $attr['attr_id'] . ':' . $attr['name'] . '::' . (isset($attr['default_value']) && $attr['default_value'] ? $attr['default_value'] : ''); ?>"
													   class="js-preview-text js-text"/>
											</label>
										<?php endforeach; ?>
									</div>
									<div class="font">
										<h2><?php echo L('font'); ?></h2>
										<div class="font-box js-font-box">
											<?php foreach ($monogram_attributeList['font']['values'] as $attrv2) { ?>
												<img src="<?php echo $web_url."/data/timthumb.php?rand=" .time()."&v=1&w=40&h=40&zc=1&src=" . $attrv2['image']; ?>"
													 title="<?php echo $monogram_attributeList['font']['attr_id'] . ':' . $monogram_attributeList['color']['name'] . ':' . $attrv2['product_attr_id'] . ':' . $attrv2['label'] . ':' . $attrv2['attr_value_id']; ?>"
													 attr_id="<?php echo $monogram_attributeList['font']['attr_id']; ?>" width="40"
													 height="40"<?php if ($monogram_attributeList['font']['default'] == $attrv2['product_attr_id']): ?> class="selected"<?php endif; ?> />
											<?php } ?>
										</div>
									</div>
									<div class="color">
										<h2><?php echo L('font_color'); ?></h2>
										<div class="color-box js-color-box">
											<?php foreach ($monogram_attributeList['color']['values'] as $attrv2) {
												$back_color = '#FFFFFF';
												$color_arr = explode('#', $attrv2['label']);
												if (is_array($color_arr) && isset($color_arr)) {
													$back_color = '#' . $color_arr[1];
												}
												?>
												<span style="background-image:url(<?php echo $web_url."/data/timthumb.php?rand=" .time()."&v=1&w=40&h=40&zc=1&src=" . $attrv2['image']; ?>)"
													  title="<?php echo $monogram_attributeList['color']['attr_id'] . ':' . $monogram_attributeList['color']['name'] . ':' . $attrv2['product_attr_id'] . ':' . $attrv2['label'] . ':' . $attrv2['attr_value_id']; ?>"
													  attr_id="<?php echo $monogram_attributeList['color']['attr_id']; ?>" <?php if ($monogram_attributeList['color']['default'] == $attrv2['product_attr_id']): ?>class="selected"<?php endif;
												?> ></span>
											<?php } ?>
										</div>
									</div>
								</div>
							</div>
						</div>
						<?php if (isset($monogram_attributeList['location'])) { ?>
							<div class="attribute"
								 attr_val="<?php echo $monogram_attributeList['location']['attr_id']; ?>">
								<div class="attr-head">
									<i class="js-serial-num"><?php $order_i = $order_i+1; echo $order_i; ?></i>
									<strong>绣字位置</strong>
									<span
										data-attr-id="<?php echo $monogram_attributeList['location']['attr_id']; ?>"
										class="js-btn-help">Help</span>
								</div>
								<ul class="attr-list" id="attr_value_ul">
									<?php foreach ($monogram_attributeList['location']['values'] as $attrv) {
										$attr = $monogram_attributeList['location'];
										if ($attrv['label'])://删除的属性值不显示
											?>
											<li id="hidden_miaoliao_<?php echo $attrv['attr_value_id']; ?>" <?php if ($attrv['libu_img']): ?> data-img="<?php echo $attrv['libu_img']; ?>"<?php endif; ?>
												title="<?php echo $monogram_attributeList['location']['attr_id'] . ':' . $attr['name'] . ':' . $attrv['product_attr_id'] . ':' . $attrv['label'] . ':' . $attrv['attr_value_id']; ?>"
												class="<?php if ($attrv['is_down'] == 1) {
													if ($attr['default'] == $attrv['product_attr_id']) {
														echo 'selected';
													}
												} ?>
			" is_down_value="<?php echo $attrv['is_down']; ?>">
												<a href="javascript:">
													<?php if ($attr['default'] == $attrv['product_attr_id']) $mobile_active_img = $attrv['image2']; ?>
													<img src="<?php echo $web_url."/data/timthumb.php?rand=" .time()."&v=1&w=96&h=116&zc=2&src=" . $attrv['image']; ?>"/>
													<img src="<?php echo $web_url."/data/timthumb.php?rand=" .time()."&v=1&w=96&h=116&zc=2&src=" . $attrv['image2']; ?>" class="active"/>
													<?php if ($productInfo['3d_show'] && $attrv['issd']): ?><i
														class="tag-3d js-tag-3d">3D</i><?php endif; ?>
												</a>
												<p class="attr-val"><?php echo $attrv['label']; ?><?php echo $attrv['add_money'] > 0 ? "<br>(+" . currency($attrv['add_money']) . ")" : ""; ?></p>
											</li>
										<?php endif; ?>
									<?php } ?>
								</ul>
							</div>
						<?php } ?>
					<?php endif; ?>
					<div class="clearfix controls js-controls">
						<?php if (!$msizedata): ?>
							<span
								class="btn btn-middle pull-right add_car"><?php echo L('_Add_to_Cart_'); ?>
								&gt;</span>
						<?php endif; ?>
						<span
							class="mobile-add-cart js-mobile-add-cart"
							data-cid="<?php echo $cid ? $cid : 0; ?>">
								&gt;</span>
					</div>
				</div>
				<?php endif; ?>
			</div>
		</div>
	</div>
	<script src="/statics/front/js/plugins/jquery.popupBox.js"></script>
	<script type="text/javascript" src="/statics/test/js/home/threesixty.min.js"></script>
	<script type="text/javascript" src="/statics/test/js/home/show.js"></script>
	<script src="/statics/front/js/scripts/custom/help.js"></script>
<?php include THEMES_PATH . 'public/after_body.phtml'; ?>